package com.djx.service.topic2;

import org.springframework.amqp.core.ExchangeTypes;
import org.springframework.amqp.rabbit.annotation.*;
import org.springframework.stereotype.Component;

@Component
@RabbitListener(bindings = @QueueBinding(
        value = @Queue(value = "email_topic2_queue",durable = "true",autoDelete = "false"),
        exchange = @Exchange(value = "topic_order_exchange",type = ExchangeTypes.TOPIC),
        key = "com.#.email.#"
))
public class TopicEmailConsumerBinding {
    @RabbitHandler
    public  void  getMessage(String message){
        System.out.println("weChat_topic2_queue接受的消息为："+message);
    }
}
